
<h3 class="page-heading">MSSQL 连接</h3>

<div class="gf-form-group">
	<div class="gf-form max-width-30">
		<span class="gf-form-label width-7">主机</span>
		<input type="text" class="gf-form-input" ng-model='ctrl.current.url' placeholder="localhost:1433" bs-typeahead="{{['localhost', 'localhost:1433']}}" required></input>
	</div>

	<div class="gf-form max-width-30">
		<span class="gf-form-label width-7">数据库</span>
		<input type="text" class="gf-form-input" ng-model='ctrl.current.database' placeholder="数据库名称" required></input>
	</div>

	<div class="gf-form-inline">
		<div class="gf-form max-width-15">
			<span class="gf-form-label width-7">用户</span>
			<input type="text" class="gf-form-input" ng-model='ctrl.current.user' placeholder="用户"></input>
		</div>
		<div class="gf-form max-width-15" ng-if="!ctrl.current.secureJsonFields.password">
			<span class="gf-form-label width-7">密码</span>
			<input type="password" class="gf-form-input" ng-model='ctrl.current.secureJsonData.password' placeholder="密码"></input>
		</div>
		<div class="gf-form max-width-19" ng-if="ctrl.current.secureJsonFields.password">
			<span class="gf-form-label width-7">密码</span>
			<input type="text" class="gf-form-input" disabled="disabled" value="configured">
			<a class="btn btn-secondary gf-form-btn" href="#" ng-click="ctrl.current.secureJsonFields.password = false">reset</a>
		</div>
	</div>
</div>

<div class="gf-form-group">
	<div class="grafana-info-box">
		<h5>用户权限</h5>
		<p>
      您应该只授予数据库用户对于要查询的指定数据库和数据表的 SELECT 权限。ATOPS 不验证查询是否安全，所以查询可以包含任何 SQL 语句。例如，诸如 <code>USE otherdb;</code> 和 <code>DROP TABLE user;</code> 之类的语句可以被执行。为防止这种情况发生，我们<strong>强烈</strong>建议您创建只有受限权限的特定 MySQL 用户。
		</p>
	</div>
</div>

